package com.signway.module_signway_adapter_Api;

import android.content.Context;
import android.os.signwaymanager.SignwayManager;

import com.signway.open.api.IOpenPowerApi;

/*
 * -----------------------------------------------------------------
 * Copyright (C) 2011-2019, by your Signway, All rights reserved.
 * -----------------------------------------------------------------
 *
 * ProjectName: droid5119
 *
 * Author: Administrator
 *
 * Email: pf.wang@Signway.cn
 *
 * Description:
 *
 * -----------------------------------------------------------------
 * 2019-5-29 : Create SignwayPowerApi.java
 * -----------------------------------------------------------------
 */
public class SignwayPowerApi implements IOpenPowerApi {
    private static final String TAG = "SignwayPowerApi";
    private static SignwayPowerApi mSignwayPowerApi;
    private static Context mContext;
    private SignwayManager signwayManager;

    public static synchronized SignwayPowerApi getInstance(Context context) {
        mContext = context;
        if (mSignwayPowerApi == null) {
            mSignwayPowerApi = new SignwayPowerApi(context);
        }
        return mSignwayPowerApi;
    }

    public SignwayPowerApi(Context context) {
        this.mContext = context;
        signwayManager = SignwayManager.getInstance(mContext);
    }

    //重启
    public void reboot() {
        signwayManager.reboot();
    }

    public void setPowerOnTime(long millis) {
    }

    public void powerOff() {
    }

    //休眠
    public void shutDown() {
        signwayManager.turnOffLvds();
        signwayManager.turnOffHDMI();
    }

}
